#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2014-08-22 01:14:23
# @Author  : shitao.tommy (hero007asd@gmail.com)
# @Link    : http://example.org
# @Version : $Id$

def start(page, offset):
    try:
        if int(page) > 0:
            start = (int(page)-1) * int(offset)
        else:
            start = 0
    except Exception, e:
        start = 0
        raise e
    return start